<template>
    <div class="vue-ms-main" v-loading.body="fullscreenLoading">
        <div class="ms-top" style="background: #cccccc; margin-bottom: 50px;">
            <!-- 当前页标题  -->
            <h1>父组件内容</h1>
            <button>父按钮</button>
            <p>子组件传值给负组件-----{{childval}}</p>
        </div>
        <v-img :parentval="nowvals" v-on:child-tell-me-something="listentToMyBoy"></v-img>
    </div>
</template>
<script>
    import vImg from './componentimg.vue';
    export default {
        components:{
            vImg
        },
        events:['chilvalues'],
        //  数据
        data: function(){
            return {
                total:1,
                nowvals:'父组件数据在自组建显示 props:[\'parentval\']',
                childval:''
            }
        },
        methods: {
            listentToMyBoy:function (msg) {
                this.total++;
                this.childval = msg+this.total;

            }
        },
        mounted () {
        }
    }
</script>
<style>
</style>
